1. Field of the Invention
The present invention relates to an apparatus and a method for inspecting notches on semiconductor packages or like objects by use of shading pattern matching.
2. Description of the Background Art
The surface of a semiconductor package molded of plastic resin is provided with a round or semicircular notch indicative of proper mounting orientation. The position of the notch plays an important role in correctly orienting the semiconductor package upon its mounting on a printed circuit board. It is also important to orient semiconductor packages correctly in containers for shipment from the factory.
Typically, the notch has a semicircular shape located on the periphery of the semiconductor package and measures about 1.2 mm in diameter, or a circular shape located near a package corner and measures about 2 mm across and 0.3 mm deep. For better visibility on some semiconductor packages, the bottom of each of their notches may be mirror finished while the package surfaces are satin finished.
Before shipment, semiconductor packages are inspected for the correct position of their notches. One of the most commonly used methods for inspection of this type is the so-called shading pattern matching method. Below is a brief description of how inspection equipment based on this method is typically structured and how it works.
(1) FIG. 1 is a schematic view of inspection equipment configured to inspect package notches. A TV camera 2 facing a semiconductor package 1 takes pictures of the package surface.
A lighting fixture 7 is used to stabilize the inspecting condition. An expansion slot of a personal computer 3 accommodates a picture input board 4 that receives a picture signal from the TV camera 2. The picture signal thus received is converted from analog to digital format before being transferred and written to a main memory of the personal computer 3. In the main memory, picture information is represented X and Y coordinates constituting respectively the lateral and longitudinal directions of a two-dimensional array (i.e., TV screen). The brightness of each pixel in the array is recorded illustratively as br[y][x] (br=bright). The field of view of the TV camera 2 is adjusted in such a manner that each of the pixels thereof measures 50 microns across on the surface of the semiconductor package. A mouse 6 is attached to the personal computer 1.
(2) As shown in FIG. 2, a picture of a first semiconductor package 1 is initially taken. An operator drags the mouse 6 to draw a periphery of the notch (indicated by dashed lines in FIG. 2) so that the personal computer 1 may recognize the position and range of the notch. Brightness information per pixel in that range is recorded as a template. In FIG. 4B, a densely shaded (i.e., dark) portion represents the notch and a thinly shaded (gray) portion denotes the package surface.
(3) For notch inspection from the next semiconductor package onward, the template is overlaid onto a two-dimensional array br[y][x] of each picture signal received. The degree of coincidence between the template and the input picture is acquired. Inevitably, a difference of about 0.5 mm must be taken into consideration between the notch position of the first package and that of the second package. That is because there exists some play in a positioning block that secures the periphery of each semiconductor package under TV camera. The template is shifted within a range measuring 0.25 mm in each of upper, lower, right-hand and left-hand directions (i.e., spanning 5 pixels) away from the putative central point where the notch is expected most likely to exist. The notch is judged located where the degree of coincidence is the highest. With five pixels checked in each of the four directions, it is necessary to compute the degree of coincidence 121 times for 11 pixels multiplied by 11 pixels.
(4) If the degree of coincidence is found acceptably high on a semiconductor package under inspection, that means the package in question has its notch located in substantially the same position as the first semiconductor package and that the device is judged to be correctly oriented. The degree of coincidence is computed using expression (1) below for the shading pattern matching method based on normalized correlation:
r2={nxcexa3fgxe2x88x92xcexa3fxcexa3g}2/{nxcexa3f2xe2x88x92(xcexa3f)2}{nxcexa3g2xe2x88x92(xcexa3g)2}xe2x80x83xe2x80x83(1)
where, r2 stands for a score (degree of coincidence), xe2x80x9cfxe2x80x9d for the brightness of each pixel in an input picture, xe2x80x9cgxe2x80x9d for the brightness of each pixel in the template, and xe2x80x9cnxe2x80x9d for the number of effective pixels in the template.
Outlined above was the conventional method for notch inspection based on shading pattern matching. This method has the following major disadvantages:
(1) When semiconductor devices are molded of plastic resin, their circular notches typically double as ejector pins. As such, the circular notches often have the name of the country of manufacture or forming-mold numbers engraved therein. The country name and forming-mold numbers may or may not be engraved in the same direction in all molds. Because forming-mold numbers differ from one package to another, utilization of a template created at the time of inspecting the first semiconductor package can worsen the degree of notch coincidence from the second semiconductor package on. Such a template is not suitable for checking the presence or absence of notches.
(2) Where the plastic mold surface is satin finished while the notch bottom is mirror finished, a picture taken by TV camera typically shows a gray mold surface in combination with a black notch bottom. When the forming-mold is used for an extended period of time, however, the mirror finished portion may deteriorate by wear and cease to be mirror finished. When taken by TV camera, the worn mirror finished portion may actually appear gray resembling the satin finished plastic mold portion that originally appears gray. The arithmetic expression (1) for the above-described pattern matching method based on normalized correlation proves to be 100 percent accurate when the template differs relatively from the input picture under inspection in terms of brightness, as shown in FIG. 3B. Where the amount of brightness changes diminishes as shown in FIG. 3C, the expression is still 100 percent accurate. As long as brightness changes fall within a range (xcex2) indicated by a thick line arrow, the arithmetic expression applies 100 percent. The problem is that the brightness of the satin finished portion varies in a range (xcex1) indicated by thin line arrows. That is, if the brightness of the satin finished portion becomes the same as that of the notch bottom, the degree of coincidence worsens and the arithmetic expression above cannot be applied to the inspection for the presence or absence of notches.
(3) It is common practice to form the notch surface dipped about 0.3 mm from the level of the plastic mold surface. A staggered slope thus formed usually appears black in a picture taken by TV camera. As described in the preceding paragraph (2), if there is little difference in brightness between the package surface and the notch portion, the presence of the staggered slope in black worsens the degree of coincidence, which makes it impossible to check the presence or absence of notches. (4) The slope representing the difference in elevation between the plastic mold surface and the notch portion may appear white reflecting the illumination in a picture. This also deteriorates the degree of coincidence and makes it impossible to check the presence or absence of notches.
It is therefore an object of the present invention to overcome the above and other deficiencies of the prior art and to provide an apparatus and a method for notch inspection unaffected by engraved characters inside the notch so that the degree of coincidence remains undegraded in judging the presence or absence of notches on packages.
It is another object of the present invention to provide an apparatus and a method for notch inspection unaffected by little difference in brightness change between the satin finished mold surface and the notch bottom so that the degree of coincidence remains undegraded in judging the presence or absence of notches.
It is a further object of the present invention to provide an apparatus and a method for notch inspection for preventing the degree of coincidence from getting worsened by the presence of a staggered slope appearing black where there is little difference in brightness between the package surface and the notch portion.
It is an even further object of the present invention to provide an apparatus and a method for notch inspection unaffected by the slope of the notch appearing white upon reflecting illumination so that the degree of coincidence remains undegraded in judging the presence or absence of notches.
The above objects of the present invention are achieved by a notch inspection apparatus for inspecting notches of target objects based on shading pattern matching. The apparatus includes a unit for creating a template which characteristically represents brightness-varying portions on a notch edge. A camera is provided for taking a picture to be inspected of the target object. The apparatus also includes a unit for performing shading pattern matching between the template and the picture to be inspected. The apparatus further includes a unit for determining the presence of a notch on the target object based on the result of the shading pattern matching.
The above objects of the present invention are achieved by a notch inspection method for inspecting notches of target objects based on shading pattern matching. In the method, there is created a template which characteristically represents brightness-varying portions on a notch edge. A picture to be inspected of the target object is taken by using a camera. Shading pattern matching between the template and the picture to be inspected is performed. The presence of a notch on the target object is determined based on the result of the shading pattern matching.